<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<title>申诉</title>
<link rel="stylesheet" href="${ctx}/static/plug/frozenui-1.3.0/css/frozen.css" media="all">
<link rel="stylesheet" href="${ctx}/static/css/recharge/appeal.css" media="all">
</head>
<body>
	<h4>申诉交易项</h4>
	<div class="parkinfo" >
		<p><span class="pis1">停车场地：</span><span>${parkinfoAppealVo.parkName}</span></p>
		<p><span class="pis1">车辆信息：</span><span>${parkinfoAppealVo.carNo}</span></p>
		<p><span class="pis1">进入时间：</span><span>${parkinfoAppealVo.inTime}</span></p>
		<p><span class="pis1">出场时间：</span><span>${parkinfoAppealVo.outTime}</span></p>
		<p><span class="pis1">车费总额：</span><span><fmt:formatNumber type="number" value="${parkinfoAppealVo.allMoney/10}" pattern="0.00" maxFractionDigits="2" />元</span></p>
		<p><span class="pis1">停车券抵扣：</span><span><fmt:formatNumber type="number" value="${parkinfoAppealVo.couponMoney/10}" pattern="0.00" maxFractionDigits="2" />元</span></p>
		<p><span class="pis1">实际扣费：</span><span><fmt:formatNumber type="number" value="${parkinfoAppealVo.money/10}" pattern="0.00" maxFractionDigits="2" />元</span></p>
	</div>
	<h4>申诉类型</h4>
	<select class="appealType">
		<c:if test="${codeValues != null &&  fn:length(codeValues) > 0 }">
			<c:forEach var="codeValue" items="${codeValues}">
				<option value="${codeValue.id}">${codeValue.name}</option>
			</c:forEach>
		</c:if>
		
	</select>
	<textarea type="text" class="appealVal" placeholder="其他备注信息（选填,最多200字）"></textarea>
	<textarea type="text" class="phone" placeholder="请输入手机号码（必填）"></textarea>
	<button class="toAppeal" >提交申诉</button>
	
</body>
<script src="${ctx}/static/plug/frozenui-1.3.0/lib/zepto.min.js"></script>
<script src="${ctx}/static/plug/frozenui-1.3.0/js/frozen.js"></script>
<script src="${ctx}/static/js/jweixin-1.2.0.js"></script>
<script>
   $(function() {
	 var paramObj = {
				"appealParams":"${appealParams}",
				"successParams":"${successParams}"
			};
	   
	  $(".toAppeal").click(function() {
		var appealVal=$(".appealVal").val();
		var phone=$(".phone").val();
		var appealType=$(".appealType").val();
		if(!phone){
			showTips("warn","手机号不能为空！");
			return;
		}
		if(appealVal){
			if(appealVal.length>200){
				showTips("warn","申诉内容超过200字！");
				return;
			}
		}
		if(phone.length!=11){
			showTips("warn","手机号不是11位！");
			return;
		}
		var param = {"params":paramObj.appealParams,"appealValue":appealVal,"phone":phone,"appealType":appealType};
		$.post("${action}", param, function(data) {
			if (data.result) {
				window.location.href = "${action}?params="+paramObj.successParams;
			} else {
				showTips("warn","系统繁忙！");
			}
		});
		
		
	});
});
</script>
</html>
